package org.agent.aigccore.basic.aop.spec.impl;

import org.agent.aigccore.basic.aop.spec.EventSpec;
import org.agent.aigccore.basic.enums.*;

/**
 * 用户管理事件规范集合。
 * 包含用户管理相关的所有操作事件规范。
 */
public final class UserManageSpecs {
    private UserManageSpecs() {}

    /** 用户创建事件规范 */
    public static final class Create implements EventSpec {
        @Override public LogModule module() { return LogModule.USER_MANAGE; }
        @Override public LogAction action() { return LogAction.CREATE; }
        @Override public LogType type() { return LogType.OPERATION; }
        @Override public LogLevel defaultLevel() { return LogLevel.INFO; }
        @Override public String[] defaultTags() { return new String[]{"user","create"}; }
    }

    /** 用户删除事件规范 */
    public static final class Delete implements EventSpec {
        @Override public LogModule module() { return LogModule.USER_MANAGE; }
        @Override public LogAction action() { return LogAction.DELETE; }
        @Override public LogType type() { return LogType.OPERATION; }
        @Override public LogLevel defaultLevel() { return LogLevel.INFO; }
        @Override public String[] defaultTags() { return new String[]{"user","delete"}; }
    }

    /** 用户更新事件规范 */
    public static final class Update implements EventSpec {
        @Override public LogModule module() { return LogModule.USER_MANAGE; }
        @Override public LogAction action() { return LogAction.UPDATE; }
        @Override public LogType type() { return LogType.OPERATION; }
        @Override public LogLevel defaultLevel() { return LogLevel.INFO; }
        @Override public String[] defaultTags() { return new String[]{"user","update"}; }
    }

    /** 用户搜索事件规范 */
    public static final class Search implements EventSpec {
        @Override public LogModule module() { return LogModule.USER_MANAGE; }
        @Override public LogAction action() { return LogAction.SEARCH; }
        @Override public LogType type() { return LogType.OPERATION; }
        @Override public LogLevel defaultLevel() { return LogLevel.INFO; }
        @Override public String[] defaultTags() { return new String[]{"user","search"}; }
    }

    /** 用户密码重置事件规范 */
    public static final class ResetPassword implements EventSpec {
        @Override public LogModule module() { return LogModule.USER_MANAGE; }
        @Override public LogAction action() { return LogAction.RESET_PASSWORD; }
        @Override public LogType type() { return LogType.SECURITY; }
        @Override public LogLevel defaultLevel() { return LogLevel.WARN; }
        @Override public String[] defaultTags() { return new String[]{"user","reset_password"}; }
    }
}


